﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MMDemo
{
    class NewSortData:InterfaceNewData
    {
        public bool NewData()
        {
            switch (GlobalSort.operateType)
            {
                case OperateTypeSort.Bubble:
                case OperateTypeSort.Quick:
                default:
                    InitSortBubble(); break;
            }
            return PublicDataClass.IsInit;
        }

        public void InitSortBubble()
        {
            SortInputForm sif = new SortInputForm();
            sif.ShowDialog();
        }
       
        public void ShowForm(SysDemoForm demof, SysArithmeticForm arif, int Width, int Height)
        {
            demof.Top = 0;
            demof.Left = 0;
            demof.Width = Width * 3 / 5;
            demof.Height = Height;
            demof.Show();

            arif.Top = 0;
            arif.Left = Width * 3 / 5;
            arif.Width = Width * 2 / 5;
            arif.Height = Height;
            arif.Show();
        }
    }
}
